#ifndef AST_DECLARATIONS_ENUMERATOR_H
#define AST_DECLARATIONS_ENUMERATOR_H

#include "../ASTNode.h"
class sym;
class ConstantExpr;

/*
C99   6.7.2.2
enumerator:
		enumeration-constant
		enumeration-constant    =   constant-expression
*/
class Enumerator : public ASTNode
{
protected:
	Enumerator(void)
		: ASTNode(ASTNode::enumerator){};
public:
	Enumerator(sym *pEnumConstant, ConstantExpr *pConsExpr = NULL)
		: ASTNode(ASTNode::enumerator)
		, m_pEnumConstant(pEnumConstant)
		, m_pConstantExpr(pConsExpr){} ;
	virtual ~Enumerator(void);

	virtual void				codeGen();

protected:
	sym *						m_pEnumConstant;
	ConstantExpr *				m_pConstantExpr;	//may be NULL
};
#endif

